<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/favicon.ico}" href="../../../../static/favicon.ico"/>
    <link rel="stylesheet" th:href="@{/layui-admin/layui/css/layui.css}" href="../../../../static/layui-admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" th:href="@{/layui-admin/style/admin.css}" href="../../../../static/layui-admin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">分组管理</div>
        <div class="layui-card-body">
            <table class="layui-hide" id="group-table" lay-filter="group-table"></table>
            <script type="text/html" id="group-toolbar">
                <div class="layui-btn-group">
                    <button class="layui-btn layui-btn-sm" lay-event="add-toolbar">
                        <i class="layui-icon">&#xe654;</i>添加
                    </button>
                    <button class="layui-btn layui-btn-normal layui-btn-sm" lay-event="edit-toolbar">
                        <i class="layui-icon">&#xe642;</i>编辑
                    </button>
                    <button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del-toolbar">
                        <i class="layui-icon">&#xe640;</i>删除
                    </button>
                    <button class="layui-btn layui-btn-warm layui-btn-sm" lay-event="refresh-toolbar">
                        <i class="layui-icon">&#xe669;</i>刷新
                    </button>
                </div>
            </script>
            <script type="text/html" id="group-tool">
                <div class="layui-btn-group">
                    <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit-tool">
                        <i class="layui-icon">&#xe642;</i>编辑
                    </button>
                    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del-tool">
                        <i class="layui-icon">&#xe640;</i>删除
                    </button>
                </div>
            </script>
            <script type="text/html" id="status-tpl">
                {{# if(d.statusId === 1){ }}
                <span class="layui-badge-rim">{{ d.statusExplain }}</span>
                {{# }else if(d.statusId === 2){ }}
                <span class="layui-badge layui-bg-gray">{{ d.statusExplain }}</span>
                {{# }else{ }}
                <span class="layui-badge-rim">{{ d.statusExplain }}</span>
                {{# } }}
            </script>
        </div>
    </div>
</div>
<!-- 表单编辑 -->
<form class="layui-form" id="group-form" lay-filter="group-form" style="display: none;">
    <div class="layui-form-item">
        <label class="layui-form-label">分组名称</label>
        <div class="layui-input-block">
            <input type="hidden" id="id" name="id" class="layui-input">
            <input type="text" id="groupName" name="groupName" lay-verify="required" placeholder="请输入分组名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分组说明</label>
        <div class="layui-input-block">
            <input type="text" id="groupExplain" name="groupExplain" lay-verify="required" placeholder="请输入分组说明" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分组状态</label>
        <div class="layui-input-block">
            <select id="statusId" name="statusId" lay-verify="required"></select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选择角色</label>
        <div class="layui-input-block">
            <div id="groupRole"></div>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="group-submit" id="group-submit" value="确认">
    </div>
</form>
<script th:inline="javascript">
    const config = {
        base: /*[[@{/}]]*/ '../../../../static/'
    };
</script>
<script th:src="@{/layui-admin/layui/layui.js}" src="../../../../static/layui-admin/layui/layui.js"></script>
<script th:src="@{/views/admin/master/js/group.js}" src="../../../../static/views/admin/master/js/group.js"></script>
</body>
</html>